import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
    history: createWebHistory('./'),
    // scrollBehavior: (to, from, savedPosition) => {
    //     console.log(to, from , savedPosition)
    //     return {
    //         top: savedPosition?.top || 0,
    //         left: savedPosition?.left || 0
    //     }
    // },
    routes: [{
        name: 'Home',
        path: '/home',
        component: () => import('../views/Home/Index.vue')
    }, {
        name: 'About',
        path: '/about',
        component: () => import('../views/About/Index.vue')
    }]
})

// router.isReady().then(resolve => {
//     console.log(resolve)
// }).catch(err => {
//     console.log(err)
// })

export default router
